<%--
  Created by IntelliJ IDEA.
  User: TY
  Date: 2018/4/5
  Time: 17:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script src="/js/jquery-3.3.1.min.js"></script>
<html>
<head>
    <title>Title</title>
</head>
<body>
<input type="button" value="测试1" onclick="sendJson()">
<input type="button" value="测试2" onclick="sendJson2()">
</body>
<script>
    function sendJson2() {
        $.ajax({
            type: "post",
            url: "superadmin/matching",
            data: '{"openid":"4445"}',//ids是数组形式
            traditional: true,//必须加上设置为true
            contentType: "application/json;charset=utf-8",
            success: function (result) {
                if (result == "success") {
                    alert("success");
                }

            },
        });
    }
        function sendJson() {
            $.ajax({
                type : "post",
                url : "superadmin/matching",
                data:'{"openid":"555"}',
                traditional:true,//必须加上设置为true
                contentType:"application/json;charset=utf-8",
                success : function(result) {
                    if(result=="success")
                    {
                        alert("success");
                    }

                },
            });
    }
</script>
</html>
